﻿<!DOCTYPE html>
<html>
	<meta charset="UTF-8"/>
	<head>
		<script>
			/*
			var a = "test";
			var a = function(){
			}
			console.log(a);
			*/
			/*
			var a = function b(){
				b = 3;
				console.log(b);
				b = 100;
				console.log(b);
			}
			a();
			*/
			
			/*
			var a = 1,
				b = function a(x) {
					x && a(--x);
				};
			alert(a);
			*/
			/*
			function a(x) {
				return x * 2;
			}
			var a;
			alert(a);
			*/
			
			var n = 10;
			(function(){
				var n;
				console.log(n); //undefined
				n = 20;
				console.log(n); //20
			})();
			
			
			
		</script>
	</head>
	<body>
		
		<button>点我</button>
	</body>	
</html>











